// var baseUrl = "http://192.168.3.101"
var baseUrl = "https://adiy.winediy888.com"


var fun = function(config) {
	return new Promise((resolve, rejected) => {
		// uni.showLoading({
		// 	title: '加载中',
		// 	mask: true
		// });
		uni.request({
			...config,
			url: baseUrl + config.url,
			header: {


			},
			timeout: 50000,
			success(res) {
				resolve(res.data)
			},
			fail(res) {
				rejected(res)
			},
			complete() {
				// uni.hideLoading()
			}
		})
	})

}
export default fun